<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The DOMNamedNodeMap class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="domimplementation.hasfeature.html">« DOMImplementation::hasFeature</a></li>
      <li style="float: right;"><a href="domnamednodemap.count.html">DOMNamedNodeMap::count »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.dom.html">DOM</a></li>
    <li>The DOMNamedNodeMap class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.domnamednodemap" class="reference">
 <h1 class="title">The DOMNamedNodeMap class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5, PHP 7, PHP 8)</p>
 



 
  <div class="section" id="domnamednodemap.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">DOMNamedNodeMap</strong>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.iteratoraggregate.html" class="interfacename">IteratorAggregate</a></span><span class="oointerface">,  <a href="class.countable.html" class="interfacename">Countable</a></span> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">readonly</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.domnamednodemap.html#domnamednodemap.props.length">$<var class="varname">length</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="domnamednodemap.count.html" class="methodname">count</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnamednodemap.getnameditem.html" class="methodname">getNamedItem</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifiedName</code></span>): <span class="type"><span class="type">?</span><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnamednodemap.getnameditemns.html" class="methodname">getNamedItemNS</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$namespace</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$localName</code></span>): <span class="type"><span class="type">?</span><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="domnamednodemap.item.html" class="methodname">item</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>): <span class="type"><span class="type">?</span><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span></span></div>

   }</div>

 
  </div>
 

  <div class="section" id="domnamednodemap.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="domnamednodemap.props.length"><var class="varname">length</var></dt>

     <dd>

      <p class="para">
       The number of nodes in the map. The range of valid child node 
       indices is <code class="literal">0</code> to <code class="literal">length - 1</code> inclusive.
      </p>
     </dd>

    
   </dl>

  </div>


  <div class="section">
   <h2 class="title">更新日志</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        The unimplemented methods <span class="methodname"><strong>DOMNamedNodeMap::setNamedItem()</strong></span>,
        <span class="methodname"><strong>DOMNamedNodeMap::removeNamedItem()</strong></span>,
        <span class="methodname"><strong>DOMNamedNodeMap::setNamedItemNS()</strong></span> and
        <span class="methodname"><strong>DOMNamedNodeMap::removeNamedItem()</strong></span> have been removed.
       </td>
      </tr>

      <tr>
       <td>8.0.0</td>
       <td>
        <span class="classname"><strong class="classname">DOMNamedNodeMap</strong></span> implements
        <span class="interfacename"><a href="class.iteratoraggregate.html" class="interfacename">IteratorAggregate</a></span> now.
        Previously, <span class="interfacename"><a href="class.traversable.html" class="interfacename">Traversable</a></span> was implemented instead.
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>




 
 </div>
 
 




















 
<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="domnamednodemap.count.html">DOMNamedNodeMap::count</a> — Get number of nodes in the map</li><li><a href="domnamednodemap.getnameditem.html">DOMNamedNodeMap::getNamedItem</a> — Retrieves a node specified by name</li><li><a href="domnamednodemap.getnameditemns.html">DOMNamedNodeMap::getNamedItemNS</a> — Retrieves a node specified by local name and namespace URI</li><li><a href="domnamednodemap.item.html">DOMNamedNodeMap::item</a> — Retrieves a node specified by index</li></ul>
</div>
</div></div></body></html>